package com.vipboot.auth.domain.form;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import static com.vipboot.auth.constant.AuthConst.*;


/**
 * 密码登录对象
 */
//@AllArgsConstructor
//@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = true)
public class PasswordLoginBody extends LoginBody {

    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Length(min = UserNameMinLength, max = UserNameMaxLength, message = "账户长度必须在{min}到{max}个字符之间")
    private String username;

    /**
     * 用户密码
     */
    @NotBlank(message = "用户密码不能为空")
    @Length(min = PasswordMinLength, max = PasswordMaxLength, message = "用户密码长度必须在{min}到{max}个字符之间")
    private String password;

}
